#ifndef MYOPENGLWIDGET_H
#define MYOPENGLWIDGET_H
#include<QOpenGLWidget>
#include<QOpenGLFunctions>
#include<QOpenGLBuffer>
class QOpenGLShaderProgram;
class QOpenGLTexture;
class MyOpenGLWidget:public QOpenGLWidget,protected QOpenGLFunctions
{
    Q_OBJECT
public:
    explicit MyOpenGLWidget(QWidget *parent=0);
protected:
    void initializeGL();
    void paintGL();
    void resizeGL(int width, int height);
    void keyPressEvent(QKeyEvent *event);
private:
    QOpenGLShaderProgram *program;
    QOpenGLBuffer vbo;
    QOpenGLTexture *textures[2];
    GLfloat translate,xRot,yRot,zRot;

};

#endif // MYOPENGLWIDGET_H
